from django.db import models

class Category(models.Model):
    name = models.CharField(max_length=255, unique=True)
    icon = models.FileField(upload_to='icon/category', blank=True, null=True)
    parent = models.ForeignKey('self', blank=True, null=True)
    
    # Todo: add SEO
    
    def __unicode__(self):
        return self.name